<?php 
	session_start();
	header("Content-type:text/html;charset=utf-8");


	$id = $_GET['id'];

	$conn = 	$conn = mysqli_connect('127.0.0.1','root','pwd','admin',3306);
	mysqli_set_charset($conn,'utf8');

	if(mysqli_query($conn,"DELETE FROM liuyan WHERE id='{$id}'")){
		echo "<script>alert('删除成功');location='consult.php'</script>";
	}else{
		echo "<script>alert('删除失败');location='consult.php'</script>";
	}
	mysqli_close($conn);

 ?>